import java.util.Arrays;
import java.util.Map;


class Student implements Cloneable{        //浅拷贝
    int[] data;

    public Student(int[] data){
        this.data = data;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
public class Test08 {
    public static void main(String[] args) throws CloneNotSupportedException {

        int[] arr= new int[]{3,2,1};
        System.out.println(arr);
        Student student1 = new Student(arr);
        Student student2 = (Student) student1.clone();
        System.out.println("student1的引用为："+student1);
        System.out.println("student2的引用为 "+student2);
        System.out.println(student1.data);
        System.out.println(student2.data);
        student1.data[1]=99;
        System.out.println(Arrays.toString(student1.data));
        System.out.println(Arrays.toString(student2.data));
    }
}
